// pages/c/c.js
import http from '../../common/http'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    b:[]
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    http({
      url: 'http://route.showapi.com/1700-2',
      method: 'GET',
      data: {
        showapi_appid: '1367085',
        showapi_sign: 'cb8507c33e4a43cfa34a954c91b91fd6',
        classifyId:options.id
      },
    }).then(res => {
      console.log(res);
      console.log(res.data.showapi_res_body.contentlist);
      // console.log();
      this.setData({
        b: res.data.showapi_res_body.contentlist
      })
    })
  },
  xq(e){
    console.log(e.currentTarget.dataset.id);
    wx.navigateTo({
      url: `../d/d?id=${e.currentTarget.dataset.id}&title=${e.currentTarget.dataset.title}`,
    })
  }
})